#include<iostream>
using namespace std;

int main()
{
	int n;
	double sum1 = 0;
	double sum2 = 0;
	
	cin >> n;
	for(int i = 1;i <= n;i++)
	{
		if(i % 2 == 0)
		{
			sum1 += 1.0 / i; 
		}
		else
		{
			sum2 += 1.0 / i;
		}
	}
	double S = sum2 - sum1;
	printf("%.4f",S);
	return 0;
}
